import http from '@/common/utils/request.js'

export const coupon = {
	//获取列表
	getCouponList(data){
		return http.get('/system/coupon/', {params:data, custom:{}})
	},
	//获取详情
	getItemById(data){
		return http.post('/system/coupon/getItemById/', data, {custom:{}})
	},
	//创建
	createCoupon(data){
		return http.post('/system/coupon/createAction/', data, {custom:{}})
	},
	//验证兑换券
	checkCoupon(data){
		return http.post('/system/coupon/checkCoupon/', data, {custom:{}})
	},
	//核销兑换券
	cancelCoupon(data){
		return http.post('/system/coupon/cancelCoupon/', data, {custom:{}})
	},
	// 根据会员卡获取券
	getCouponListForUserCart(data){
		return http.get('/system/couponForUserCart/', {params:data, custom:{}})
	},
}